package day020.homework;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class P2 {
    public static void main(String[] args) throws IOException {
        List<String> list = new ArrayList<>();
        list.add("迪丽热巴");
        list.add("古力娜扎");
        list.add("周杰伦");
        list.add("蔡徐坤");

        BufferedWriter bw = new BufferedWriter(new FileWriter("D:\\day020\\p2.txt"));
        for (String str : list) {
            bw.write(str);
            bw.newLine();
        }

        bw.close();
    }
}
